import Vue from "vue";


export default function vmBus(onType, functData) {
  const vm = new Vue();
  setTimeout(() => {
    if(functData instanceof Function) {
      vm.$bus.$on(onType, functData)
    }else {
      vm.$bus.$emit(onType, functData)
    }
    
  }, 0);
};